Putting geopolitics through Python 🔬¶

January 2022 in pictures¶

Latest China BRI partners EDA¶

1- Create the database of Countries with pycountry¶

2- Loop over to fetch Google search results [:3] for keyword¶

['bilateral',
 'deepen',
 'strategic',
 'partnership',
 'cooperation',
 'neutral',
 'rebalancing',
 'warn',
 'oppose',
 'severing']

2bis- Run the same query with OpenAI (update 2023)¶

prompt = '2023 China partnership level with '
prompt_with_query = prompt + c

3- Now attribute a sentiment score to the snipets with BERT tokenizer¶

4- Visualize the data and statistics¶

5- Build the world map with folium & countries.geo.json choropleth¶

Make this Notebook Trusted to load map: File -> Trust Notebook

6. Going further : adding country data such as GDP with https://data.worldbank.org/ API...¶